<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta name="renderer" content="webkit">
  <title></title>
  <link rel="stylesheet" href="css/pintuer.css">
  <link rel="stylesheet" href="css/admin.css">
  <script src="js/jquery.js"></script>
  <script src="js/pintuer.js"></script>

</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 我要参加的会议列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <%-- <div class="padding border-bottom">
      -<ul class="search" style="padding-left:10px;">
         <li> <a class="button border-main icon-plus-square-o" href="add.html"> 添加连接</a> </li>
           &lt;%&ndash;<li>
               <div class="label">
                   <label>请选择搜索方式</label>
               </div>
             <select id="serachId" name="serachId" class="input" style="width:200px; line-height:17px;">
               <option value="1">教师id</option>
               <option value="2">教师姓名</option>
               <option value="3">教师年龄</option>
               <option value="4">教师工资</option>
               <option value="5">教师加入时间</option>
               <option value="6">是否为党员</option>
             </select>
           </li>&ndash;%&gt;
         <li>
           <input type="text" id="keyWord" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
           <a href="javascript:changesearch()" class="button border-main icon-search"> 搜索</a></li>
       </ul>
    </div>--%>
    <table class="table table-hover text-center">
      <tr>
        <th>预订人</th>
        <th>会议室名称</th>
        <th>会议名称</th>
        <th>会议开始时间</th>
        <th>会议结束时间</th>
        <th>会议是否被确定</th>
      </tr>

      <c:forEach items="${pb.list}" var="workervo" >
        <tr>
            <%--          <td style="text-align:left; padding-left:20px;">--%>
            <%--              ${workervo.id}</td>--%>
          <td width="10%"><span  alt="" width="70" height="50" >${workervo.userName}</span></td>
          <td>${workervo.meetingRoomName}</td>
          <td>${workervo.meetingName}</td>
          <td>${workervo.startTime}</td>
          <td>${workervo.endTime}</td>

          <c:if test="${workervo.confirm==true}">
            <td>已确认</td>
          </c:if>
          <c:if test="${workervo.confirm!=true}">
            <td>未确认</td>
          </c:if>

          <td><div class="button-group">

            <c:if test="${workervo.confirm!=true }">
              <a class="button border-main" href="ConnectionServlet?id=${workervo.id}&flag=7">
                <span class="icon-edit"></span> 确认预定</a>

            </c:if>

          </div></td>
        </tr>

      </c:forEach>


      <%--<c:if test="${pb.currentPage == 1}">
        <tr>
          <td colspan="8">
            <div class="pagelist">
              <a href="ConnectionServlet?flag=1&page=1">首页</a>
              <span class="current" style="background-color: #bbbbbb;border: 0px">上一页</span>
              <span class="current">${pb.currentPage}</span>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage+1}">${pb.currentPage+1}</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage+2}">${pb.currentPage+2}</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage+1}">下一页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.totalPage}">尾页</a>
            </div></td>
        </tr>
      </c:if>
      <c:if test="${pb.currentPage == pb.totalPage && pb.currentPage != 1}">
        <tr>
          <td colspan="8">
            <div class="pagelist">
              <a href="ConnectionServlet?flag=1&page=1">首页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage-1}">上一页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage-1}">${pb.currentPage-1}</a>
              <span class="current">${pb.currentPage}</span>
              <span class="current" style="background-color: #bbbbbb;border: 0px">下一页</span>
              <a href="ConnectionServlet?flag=1&page=${pb.totalPage}">尾页</a>
            </div></td>
        </tr>
      </c:if>
      <c:if test="${pb.currentPage != 1 && pb.currentPage != pb.totalPage && pb.totalPage != 1}">
        <tr>
          <td colspan="8">
            <div class="pagelist">
              <a href="ConnectionServlet?flag=1&page=1">首页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage-1}">上一页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage-1}">${pb.currentPage-1}</a>
              <span class="current">${pb.currentPage}</span>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage+1}">${pb.currentPage+1}</a>
              <a href="ConnectionServlet?flag=1&page=${pb.currentPage+1}">下一页</a>
              <a href="ConnectionServlet?flag=1&page=${pb.totalPage}">尾页</a>
            </div></td>
        </tr>
      </c:if>--%>


    </table>
  </div>
</form>
<script type="text/javascript">

  function mydel(teaId){
    //alert(teaId);
    if(confirm("您确定要删除吗？")){
      //alert(this);
      var str = "TeacherServlet?flag=2&teaId=" + teaId;
      location.href= str;
    }
  }

  //搜索
  function changesearch(){
    var keyWord = $("#keyWord").val();
    var searchId = $("#serachId").val();
    location.href="TeacherServlet?flag=6&id=" + searchId + "&keyWord=" + keyWord;
  }


</script>
</body>
</html>